
package org.darcy.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.darcy.framework.model.PageParam;
import org.darcy.entity.SysLog;

@ApiModel(": SysLogModel")
@Getter
@Setter
public class SysLogModel extends PageParam implements Serializable{
	
	private static final long serialVersionUID = 1L;
     
    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value="")
	private Long id;
	
    @ApiModelProperty(value="已登录用户ID")
	private Long userId;
	
    @ApiModelProperty(value="日志类型（系统操作日志，用户访问日志，异常记录日志）")
	private String type;
	
    @ApiModelProperty(value="日志级别")
	private String logLevel;
	
    @ApiModelProperty(value="日志内容（业务操作）")
	private String content;
	
    @ApiModelProperty(value="请求参数（业务操作）")
	private String params;
	
    @ApiModelProperty(value="爬虫类型（当访问者被鉴定为爬虫时该字段表示爬虫的类型）")
	private String spiderType;
	
    @ApiModelProperty(value="操作用户的ip")
	private String ip;
	
    @ApiModelProperty(value="操作用户的user_agent")
	private String ua;
	
    @ApiModelProperty(value="评论时的系统类型")
	private String os;
	
    @ApiModelProperty(value="评论时的浏览器类型")
	private String browser;
	
    @ApiModelProperty(value="请求的路径")
	private String requestUrl;
	
    @ApiModelProperty(value="请求来源地址")
	private String referer;
	
    @ApiModelProperty(value="添加时间")
	private Date createTime;
	
    @ApiModelProperty(value="更新时间")
	private Date updateTime;
	
    
    /**
   	 * model类转化为mybatis plus 查询条件
   	 */
   	public QueryWrapper<SysLog> buildWrapper() {
   		QueryWrapper<SysLog> p = new QueryWrapper<SysLog>();
   		return p;
   	}

}
